//
//  Config_System.swift
//  YYProject
//
//  Created by 陆文宇 on 2017/8/10.
//  Copyright © 2017年 陆文宇. All rights reserved.
//

import UIKit

let screenBounds = UIScreen.main.bounds
let screenSize = screenBounds.size
let screenWidth = screenBounds.width
let screenHeight = screenBounds.height

let appConfig_notification_clientId = "clientId"
let appConfig_version_city = "cityVersion"


/// 判断是真机还是模拟器的方法
struct Platform {
    static let isSimulator: Bool = {
        var isSim = false
        #if arch(i386) || arch(x86_64)
            isSim = true
        #endif
        return isSim
    }()
}

func delay(_ second: TimeInterval, _ closure: @escaping () -> Void) {
    DispatchQueue.main.asyncAfter(deadline: DispatchTime(uptimeNanoseconds: DispatchTime.now().uptimeNanoseconds + NSEC_PER_MSEC * UInt64(1000 * second))) {
        closure()
    }
}
